/*游客那题：一个景区根据游人的年龄收取不同价格的门票。请编写游人 类，根据年龄段决定能够购买的门票价格并输出.规则如下:
   14以下80以上免票,14-18半票,其他全票*/
package ZUOYE0428;

import java.util.Scanner;

public class TouristShow {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.print("请输入您的年龄：");
		int year = in.nextInt();
		int ticket = 100;
		if (year < 14 || year > 80) {
			Tourist test = new Tourist();
			test.age = year;
			test.money = 0;
			test.show();
		} else if (year >= 14 && year <= 18) {
			Tourist test = new Tourist();
			test.age = year;
			test.money = ticket / 2;
			test.show();
		} else {
			Tourist test = new Tourist();
			test.age = year;
			test.money = ticket;
			test.show();
		}

	}

}
